package bim.domain;

import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.util.Date;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.util.StringUtils;

public abstract class BaseEntity {
	/**
	 * Logger for this class
	 */
	private static final Logger logger = LoggerFactory.getLogger(BaseEntity.class);
	
	protected String id;
	

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}
	
    
    public String decode(String s) {
    	s = StringUtils.isEmpty(s)?"":s;
    	try {
			return URLDecoder.decode(s,"UTF-8");
		} catch (UnsupportedEncodingException e) {
			logger.error("URL解码异常",e);
		}
		return s;
    }
}
